---
title: clsImageImport
summary: API reference for clsImageImport.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Services.Imaging.Import
reference_type: embedded
---

# clsImageImport

`clsImageImport` is a serializable data-transfer type that carries imaging-import index metadata spanning claim, policy, agency/group, legal, and task-routing domains. It holds caller-populated field values representing document classification, affiliation, and workflow-routing parameters for the OnBase imaging import / xPresso document-distribution pipeline. The `ToString()` method serializes the populated instance into a newline-delimited `KEY=value` block that forms the wire contract with downstream imaging systems, applying field-emission rules ([BR-IMG-001](../../business-rules.md#br-img-001-date-field-emission) through [BR-IMG-007](../../business-rules.md#br-img-007-legal-case-identifier-emission)) that suppress unset or invalid index values. The class has no outbound coupling and performs no I/O; all transport is owned by the `SAIF.Services.Printing/clsPrint` consumer.*

## Purpose
- Carry imaging-import index metadata populated by a caller, spanning claim, policy, legal-case, agency/group, and task-routing contexts
- Serialize the instance into the fixed `KEY=value` wire format for consumption by the OnBase imaging import / xPresso document-distribution pipeline, applying field-emission rules to suppress unset values
- Provide construction-time defaults ([BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)) so callers that set only claim/document identifiers produce a valid, indexable claim-file import request*
- Define the imaging-import index vocabulary via public constants (`OnBaseType*`, `OnBaseSubType*`) for consistent OnBase document-type and sub-type classification across callers

## Context
- Namespace: `SAIF.Services.Imaging.Import`
- Assembly/package: `SAIF.Services.Imaging.Import`

## Public constants

| Constant | Type | Value | Purpose |
| --- | --- | --- | --- |
| `UseOnBaseDocTypes` | `String` | `"OnBase16"` | Feature/version switch token identifying the OnBase document-type vocabulary in use ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseTypeClIndemity` | `String` | `"CL - Indemnity"` | OnBase document type constant for indemnity claims ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseTypeClAdministrative` | `String` | `"CL - Administrative"` | OnBase document type constant for administrative documents ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseTypeClFROI` | `String` | `"CL - FROI"` | OnBase document type constant for First Report of Injury ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseTypeClWorker` | `String` | `"CL - Worker"` | OnBase document type constant for worker-related documents ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseSubTypeCorrespondence` | `String` | `"Correspondence"` | OnBase document sub-type constant for correspondence ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseSubType1502` | `String` | `"1502"` | OnBase document sub-type constant for 1502 forms ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseSubTypeSaifCreated801` | `String` | `"SAIF created 801"` | OnBase document sub-type constant for SAIF-created 801 documents ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `OnBaseSubTypeWcdHistory` | `String` | `"WCD History"` | OnBase document sub-type constant for WCD history records ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |

## Public auto-properties

All members below are public read/write auto-properties. Defaults are the initializers declared in source; where no initializer exists the CLR default applies (`Date.MinValue`, `0`, `Nothing`).

| Property | Type | Default | Purpose |
| --- | --- | --- | --- |
| `BatID` | `String` | `String.Empty` | Imaging batch identifier; emitted in the wire block as `BATID` |
| `ClaimID` | `Decimal` | `0` | Claim surrogate key; emitted in the wire block as `CLAIMID` |
| `ClaimNum` | `String` | `String.Empty` | Business claim number; emitted in the wire block as `CLAIMNUM` |
| `CommentText` | `String` | `String.Empty` | Free-text comment stored with the imaged document; emitted unconditionally |
| `CreateUser` | `String` | `String.Empty` | User credited with the import; emitted unconditionally |
| `DiscoveryFlag` | `String` | `String.Empty` | Legal-discovery marker on the imaged document; emitted unconditionally; meaning and accepted values are defined downstream* |
| `DisplayField1` | `String` | `String.Empty` | Generic index/display slot 1 surfaced by the imaging viewer; emitted unconditionally* |
| `DisplayField2` | `String` | `String.Empty` | Generic index/display slot 2 surfaced by the imaging viewer; emitted unconditionally* |
| `DisplayField3` | `String` | `String.Empty` | Generic index/display slot 3 surfaced by the imaging viewer; emitted unconditionally* |
| `DocumentDate` | `Date` | `Date.MinValue` | Document creation date; emitted as `MM-dd-yyyy` when within valid range, otherwise empty ([BR-IMG-001](../../business-rules.md#br-img-001-date-field-emission)) |
| `DocumentDateDays` | `Decimal` | `7` | Tolerance window in days around the document date for matching; emitted when greater than zero, otherwise empty ([BR-IMG-002](../../business-rules.md#br-img-002-document-date-tolerance-window-emission)) |
| `ImageCategoryCode` | `String` | `String.Empty` | Imaging category classification code; emitted unconditionally |
| `ImageDeleteFlag` | `String` | `String.Empty` | Marks the image for deletion downstream; emitted unconditionally* |
| `ImageDocumentTypeCode` | `String` | `String.Empty` | Document-type code (populated from the `OnBaseType*` constants); emitted unconditionally ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)) |
| `ImageIndexFlag` | `String` | `"Y"` | Defaults to indexing the document into the imaging repository ([BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)); emitted unconditionally |
| `ImageFileCode` | `String` | `"CLAIM"` | Defaults the target imaging file/cabinet to the claim file ([BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)); emitted unconditionally |
| `ImageSeqNum` | `Decimal` | `0` | Existing image sequence number; emitted when greater than zero, otherwise empty ([BR-IMG-003](../../business-rules.md#br-img-003-image-sequence-number-emission)) |
| `NPages` | `Decimal` | `1` | Page count (default 1 per [BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)); emitted when greater than zero, otherwise empty ([BR-IMG-004](../../business-rules.md#br-img-004-page-count-emission)) |
| `PolicyNum` | `Decimal` | `0` | Policy number; emitted when greater than zero, otherwise empty ([BR-IMG-005](../../business-rules.md#br-img-005-policy-number-emission)) |
| `ReceivedDate` | `Date` | `Date.MinValue` | Date the document was received; emitted as `MM-dd-yyyy` when within valid range, otherwise empty ([BR-IMG-001](../../business-rules.md#br-img-001-date-field-emission)) |
| `SLevel` | `Decimal` | `0` | Security/sensitivity level carried to the imaging system; emitted unconditionally* |
| `TaskCategory` | `String` | `String.Empty` | Category of the follow-up task created with the import; emitted unconditionally |
| `TaskDate` | `Date` | `Date.MinValue` | Due date of the follow-up task; emitted as `MM-dd-yyyy` when within valid range, otherwise empty ([BR-IMG-001](../../business-rules.md#br-img-001-date-field-emission)) |
| `TaskMailIDList` | `String` | `Nothing` | Recipient mail-ID list for task routing; emitted unconditionally |
| `TaskPriority` | `String` | `"MED"` | Task priority (default "MED" per [BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)); emitted unconditionally |
| `TaskSecurity` | `String` | `String.Empty` | Security qualifier applied to the created task; emitted unconditionally* |
| `TaskText` | `String` | `String.Empty` | Task body text; emitted unconditionally |
| `ImageDocumentNameCode` | `String` | `String.Empty` | External document-name code supporting the external (IW) site; emitted unconditionally* |
| `ExternalViewCode` | `String` | `String.Empty` | External-view flag supporting the external (IW) site; emitted unconditionally* |
| `SystemGeneratedFlag` | `String` | `"Y"` | Defaults the document to system-generated ([BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)); emitted unconditionally |
| `AgencyID` | `Decimal` | `0` | Agency key supporting agency/group imaging; emitted unconditionally* |
| `ProducerID` | `Decimal` | `0` | Producer key supporting agency/group imaging; emitted unconditionally* |
| `GroupAssociationCode` | `String` | `String.Empty` | Group association code supporting agency/group imaging; emitted unconditionally* |
| `Spec` | `String` | `String.Empty` | Imaging specification token; emitted unconditionally; meaning and accepted values are not documented in source** |
| `PolicyAccount` | `String` | `String.Empty` | Guidewire account number; emitted unconditionally* |
| `PolicySecuredFlag` | `String` | `"N"` | Guidewire-era marker; defaults to "N" per [BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults) indicating only the SAIF policy is secured; emitted unconditionally* |
| `AffiliationId` | `Long` | `0` | Affiliation key; emitted when greater than zero, otherwise empty ([BR-IMG-006](../../business-rules.md#br-img-006-affiliation-identifier-emission)) |
| `LegalCaseId` | `Decimal` | `0` | Legal case surrogate key; emitted when greater than zero, otherwise empty ([BR-IMG-007](../../business-rules.md#br-img-007-legal-case-identifier-emission)) |
| `LegalCaseNum` | `String` | `Nothing` | Legal case business number; emitted unconditionally |
| `LegalCopyToClaimFlag` | `String` | `Nothing` | Requests that the legal document also be filed to the claim; emitted unconditionally* |
| `LegalDistributionFlag` | `String` | `Nothing` | Requests legal distribution handling for the document; emitted unconditionally* |

## Public methods

| Member | Signature | Purpose |
| --- | --- | --- |
| `ToString` | `Public Overrides Function ToString() As String` | Serializes the populated index metadata into a newline-delimited (`vbCrLf`) `KEY=value` block for delivery to the imaging/print distribution pipeline, applying the field-emission rules ([BR-IMG-001](../../business-rules.md#br-img-001-date-field-emission) through [BR-IMG-007](../../business-rules.md#br-img-007-legal-case-identifier-emission)) to suppress unset or out-of-range values; forms the integration contract with OnBase imaging import / xPresso ([BR-IMG-010](../../business-rules.md#br-img-010-wire-format-contract-key-set-and-order)) |

## Behavioral notes
- No explicit constructor exists; the compiler-supplied parameterless constructor plus property initializers establish the defaults listed in the properties table above.
- No exception handling, validation, or null guards exist in `ToString()`; `Nothing`-valued string properties append as empty text and there is no failure path.* This library relies on callers to populate instances correctly.
- The emitted key order is fixed and deliberate, not alphabetical (e.g., `SLevel` is emitted after `ReceivedDate`); consumers and downstream imaging configuration must treat the order as part of the integration contract* ([BR-IMG-010](../../business-rules.md#br-img-010-wire-format-contract-key-set-and-order)).
- The first three keys are emitted in upper-case (`BATID`, `CLAIMID`, `CLAIMNUM`), while the remainder use Pascal casing to match the property names.*
- The field set spans multiple domains (claim, policy, agency/group, legal, task) accreted over time through source-code comments spanning 2007–2018 rather than being modelled into sub-objects.*

## Constraints and usage notes
- **Serializable for MSMQ round-tripping:** The `<Serializable()>` attribute makes binary MSMQ round-tripping an implicit versioning constraint — adding or renaming fields changes both the binary payload shape and the `KEY=value` text contract.* Any change to the public property set affects downstream consumers on both the MSMQ and xPresso distribution paths.
- **No validation:** The class does not validate assigned property values (e.g., `ImageDocumentTypeCode` may be set to any string, not just the published `OnBaseType*` constants). The constants are advisory only ([BR-IMG-009](../../business-rules.md#br-img-009-onbase-document-type-vocabulary)); callers are responsible for correct use.
- **Claim-only import requests:** Callers that set only `ClaimID`, `ClaimNum`, and document identifiers (e.g., `DocumentDate`) still produce a valid import request because the construction-time defaults ([BR-IMG-008](../../business-rules.md#br-img-008-construction-time-defaults)) provide `ImageIndexFlag="Y"`, `ImageFileCode="CLAIM"`, `NPages=1`, `DocumentDateDays=7`, `TaskPriority="MED"`, `SystemGeneratedFlag="Y"`, and `PolicySecuredFlag="N"`.
- **No caller in this repository populates instances:** The concrete LegalMaintenance scenario that produces a legal-document import (`LegalCaseId`, `LegalCaseNum`, `LegalCopyToClaimFlag`, `LegalDistributionFlag`) is not observable within this repository; only `SAIF.Services.Printing/clsPrint.vb` shows the integration pattern.** Verify legal-document population behavior via the LegalMaintenance web application or imaging audit logs.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Related documentation
- [Overview](../../overview.md)
- [Architecture](../../architecture.md)
- [Operations and processes](../../operations-processes.md)
- [Business rules](../../business-rules.md)
- [API reference](../index.md)

## Sources
- SAIF.Services.Imaging.Import/clsImageImport.vb
- SAIF.Services.Imaging.Import/SAIF.Services.Imaging.Import.vbproj
- SAIF.Services.Printing/clsPrint.vb
